<template>
  <el-container class="main-container">
    <el-header>
      <Header></Header>
    </el-header>
    <el-container>
      <el-aside :width="isCollapse ? 'auto' : '200px'"><Aside></Aside></el-aside>
      <el-main><router-view></router-view></el-main>
    </el-container>
  </el-container>
</template>

<script>
import Header from '@/component/Head.vue'
import Aside from '@/component/Aside.vue'
import { mapState } from 'vuex'
export default {
  components: {
    Header,
    Aside
  },
  computed: {
    ...mapState({
      isCollapse: state => state.Home.isCollapse
    })
  }
}
</script>

<style lang="less" scoped>
.main-container {
  height: 100%;
  .el-header {
    background-color: #373d41;
    padding-left: 0;
  }
  .el-aside {
    background-color: #333744;
  }
  .el-main {
    background-color: #eaedf1;
  }
}
</style>
